Role

enum Role : ProtocolMessageEnum

Defines the device's role on the Mesh network
Protobuf enum meshtastic.Config.DeviceConfig.Role

Entries

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

ROUTER_CLIENT = 3 [deprecated = true];

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Properties

Link copied to clipboard

Description: Treats packets from or to favorited nodes as ROUTER, and all other packets as CLIENT.
Technical Details: Used for stronger attic/roof nodes to distribute messages more widely
from weaker, indoor, or less-well-positioned nodes. Recommended for users with multiple nodes
where one CLIENT_BASE acts as a more powerful base station, such as an attic/roof node.
CLIENT_BASE = 12;
Link copied to clipboard

Description: Device that only broadcasts as needed for stealth or power savings.
Technical Details: Used for nodes that "only speak when spoken to"
Turns all of the routine broadcasts but allows for ad-hoc communication
Still rebroadcasts, but with local only rebroadcast mode (known meshes only)
Can be used for clandestine operation or to dramatically reduce airtime / power consumption
CLIENT_HIDDEN = 8;
Link copied to clipboard

Description: Device that does not forward packets from other devices.
CLIENT_MUTE = 1;
Link copied to clipboard
val CLIENT_VALUE: Int = 0

Description: App connected or stand alone messaging device.
Technical Details: Default Role
CLIENT = 0;
Link copied to clipboard

Description: Broadcasts location as message to default channel regularly for to assist with device recovery.
Technical Details: Used to automatically send a text message to the mesh
with the current position of the device on a frequent interval:
"I'm lost! Position: lat / long"
LOST_AND_FOUND = 9;
Link copied to clipboard

Description: Infrastructure node for extending network coverage by relaying messages with minimal overhead. Not visible in Nodes list.
Technical Details: Mesh packets will simply be rebroadcasted over this node. Nodes configured with this role will not originate NodeInfo, Position, Telemetry
or any other packet type. They will simply rebroadcast any mesh packets on the same frequency, channel num, spread factor, and coding rate.
REPEATER = 4;
Link copied to clipboard
ROUTER_CLIENT = 3 [deprecated = true];
Link copied to clipboard

Description: Will always rebroadcast packets, but will do so after all other modes.
Technical Details: Used for router nodes that are intended to provide additional coverage
in areas not already covered by other routers, or to bridge around problematic terrain,
but should not be given priority over other routers in order to avoid unnecessaraily
consuming hops.
ROUTER_LATE = 11;
Link copied to clipboard
val ROUTER_VALUE: Int = 2

Description: Infrastructure node for extending network coverage by relaying messages. Visible in Nodes list.
Technical Details: Mesh packets will prefer to be routed over this node. This node will not be used by client apps.
The wifi radio and the oled screen will be put to sleep.
This mode may still potentially have higher power usage due to it's preference in message rebroadcasting on the mesh.
ROUTER = 2;
Link copied to clipboard
val SENSOR_VALUE: Int = 6

Description: Broadcasts telemetry packets as priority.
Technical Details: Telemetry Mesh packets will be prioritized higher and sent more frequently by default.
When used in conjunction with power.is_power_saving = true, nodes will wake up,
send environment telemetry, and then sleep for telemetry.environment_update_interval seconds.
SENSOR = 6;
Link copied to clipboard

Description: Enables automatic TAK PLI broadcasts and reduces routine broadcasts.
Technical Details: Turns off many of the routine broadcasts to favor ATAK CoT packet stream
and automatic TAK PLI (position location information) broadcasts.
Uses position module configuration to determine TAK PLI broadcast interval.
TAK_TRACKER = 10;
Link copied to clipboard
val TAK_VALUE: Int = 7

Description: Optimized for ATAK system communication and reduces routine broadcasts.
Technical Details: Used for nodes dedicated for connection to an ATAK EUD.
Turns off many of the routine broadcasts to favor CoT packet stream
from the Meshtastic ATAK plugin -> IMeshService -> Node
TAK = 7;
Link copied to clipboard

Description: Broadcasts GPS position packets as priority.
Technical Details: Position Mesh packets will be prioritized higher and sent more frequently by default.
When used in conjunction with power.is_power_saving = true, nodes will wake up,
send position, and then sleep for position.position_broadcast_secs seconds.
TRACKER = 5;

Functions

Link copied to clipboard
Link copied to clipboard
open fun getDescriptor(): Descriptors.EnumDescriptor
Link copied to clipboard
fun getDescriptorForType(): Descriptors.EnumDescriptor
Link copied to clipboard
fun getNumber(): Int
Link copied to clipboard
fun getValueDescriptor(): Descriptors.EnumValueDescriptor
Link copied to clipboard
Link copied to clipboard
open fun valueOf(desc: Descriptors.EnumValueDescriptor): ConfigProtos.Config.DeviceConfig.Role

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.